package com.company;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;

public class Test01 {
    //非要抛出异常不可
    public static void main(String[] args) throws IOException {
        String content = new String("你好啊");
        Socket socket = new Socket("192.168.1.105",8633);
        OutputStream out = socket.getOutputStream();
        out.write(content.getBytes());
        socket.shutdownOutput();
        socket.close();
    }
}
